<template>
  <div class="home" style="background-color: #E9EEF3">
    <el-row>
      <el-col :span="6" :offset="1">
        <el-card shadow="hover" :body-style="{ padding: '15px' }">
          <img src="../../assets/images/png/feedback_vision.gif"
               class="image" @click="navigateToPage('信息反馈单可视化')">
          <div style="padding: 0px;">
            <span>信息反馈单可视化</span>
            <div class="bottom clearfix">
              <time class="time">{{ currentDate }}</time>
            </div>
          </div>
        </el-card>
      </el-col>
      <el-col :span="6" :offset="1" >
        <el-card shadow="hover" :body-style="{ padding: '15px' }">
          <img src="../../assets/images/png/surgical_records.gif"
               class="image" @click="navigateToPage('手术记录管理')">
          <div style="padding: 0px;">
            <span>手术记录管理</span>
            <div class="bottom clearfix">
              <time class="time">{{ currentDate }}</time>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      currentDate: new Date()
    };
  },
  methods: {
    navigateToPage(target) {
      // 使用Vue Router的push方法进行页面跳转
      this.$router.push({name: target});
    }
  }
}
</script>

<style lang="scss" scoped>
  .el-row {
    margin-bottom: 20px;
    &:last-child {
      margin-bottom: 0;
    }
  }
  .el-col {
    margin-top: 50px;
    border-radius: 4px;
  }

.home {
  width: 100%;
  height: 100%;
}

.time {
  font-size: 13px;
  color: #999;
}

.bottom {
  margin-top: 13px;
  line-height: 12px;
}

.button {
  padding: 0;
  float: right;
}

.image {
  width: 100%;
  display: block;
}

.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}

.clearfix:after {
  clear: both
}
</style>
